import * as getters from './getters'
import * as actions from './actions'
import mutations from './mutations'

// const 声明 一个常量才不会导致每次刷新会改变 store 的值
const state = {
  currentType: '', // 新建工单or工单详情
  newFlow: { // 新建工单
    currentStepIndex: '', // 工单步骤index
    currentActionIndex: '', // 当前动作index
    flowInfo: {}, // 当前工单信息
    flowSteps: [], // 当前工单步骤
    refreshView: 0, // 刷新流程图
    allFields: []
  },
  detailFlow: { // 工单详情
    currentStepIndex: '', // 工单步骤id
    currentActionIndex: '', // 当前动作id
    flowInfo: {}, // 当前工单信息
    flowSteps: [], // 当前工单步骤
    refreshView: 0, // 刷新流程图
    allFields: []
  },
  oldFlow: { // 老板设置
    allFields: []
  }
}
export default {
  state,
  getters,
  actions,
  mutations
}
